package com.venutech.gongan.dao;

import com.venutech.gongan.entity.DevicePermissionHistory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DevicePermissionHistoryMapper {
    int insert(DevicePermissionHistory record);

    int insertSelective(DevicePermissionHistory record);

    /**
     * 根据 设备id和申请人 id 查询
     * @param deviceId 设备id
     * @param userId 申请人 id
     * @return 申请历史记录
     */
    List<DevicePermissionHistory> selectByDeviceIdAndUserId(@Param("deviceId") int deviceId, @Param("userId") int userId);
}